From 91b1e72c31b12752ff50486e7570a6df78c4d539 Mon Sep 17 00:00:00 2001 From: "awilliam@xenbuild.aw" Date: Tue, 27 Jun 2006 16:35:59 -0600 Subject: [PATCH] [IA64] ptc.g virtualization fix 2 When emulating ptc.ga, VMM needs to change pta temporarily, which cause VHPT is not mapped by TR, then vhpt fault may happen inside VMM, it is not correct. This patch is to fix this issue. When changing pta, VMM makes VHPT disabled temporarily. Signed-off-by: Anthony Xu --- xen/arch/ia64/vmx/vmmu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/arch/ia64/vmx/vmmu.c b/xen/arch/ia64/vmx/vmmu.c index add9e5d6be..3a0d135f6f 100644 --- a/xen/arch/ia64/vmx/vmmu.c +++ b/xen/arch/ia64/vmx/vmmu.c @@ -526,7 +526,7 @@ static void ptc_ga_remote_func (void *varg) moldrid = ia64_get_rr(0x0); ia64_set_rr(0x0,vrrtomrr(v,args->rid)); mpta = ia64_get_pta(); - ia64_set_pta(v->arch.arch_vmx.mpta); + ia64_set_pta(v->arch.arch_vmx.mpta&(~1)); ia64_srlz_d(); vmx_vcpu_ptc_l(v, args->vadr, args->ps); VMX(v, vrr[0]) = oldrid; @@ -561,6 +561,8 @@ IA64FAULT vmx_vcpu_ptc_ga(VCPU *vcpu,UINT64 va,UINT64 ps) /* Try again if VCPU has migrated. */ } while (proc != v->processor); } + else if(v == vcpu) + vmx_vcpu_ptc_l(v, va, ps); else ptc_ga_remote_func(&args); } -- 2.30.2